import 'package:demo202112/MyNavigator/wy_pagea.dart';
import 'package:demo202112/utils/common_appbar.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'my_two_page.dart';

/**
 * @Author wywinstonwy
 * @Date 2022/1/9 10:30 下午
 * @Description:
 */

class OnePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // appBar: getAppBar("测试"),
      body: Center(
        child: Column(

          children: [
            Container(height: 100,),
            ElevatedButton(
              child: Text('去下一个页面'),
              onPressed: () {
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return TwoPage();
                })
                );
              },
            ),

            ElevatedButton(onPressed: () {
              Navigator.push(context, MaterialPageRoute(builder: (context)=>PageA()));
            }, child: Text('Navigator局部跳转')),

          ],
        ),
      ),
    );
  }
}